#include <avr/io.h>
#include "time.h"
#include "port.h"
#include "life.h"

/** 
 * Main routine of robot application
 * @author David Asabina
 */
int main(void){
  /**
   * The state variable may be used to execute
   * conditional logic based on the values returned
   * by the life-cycle functions
   */
  uint8_t state = 0;

  while(1){
    // initializes the robot
    state = wake();
    // executes the robot's program
    state = live();
    // executes the shut-down routine
    state = die();
  }
  return 0;
}
